<template>
  <el-aside width="200px">
    <div class="menu">
      <div class="menu-item" v-for="(item, index) in getLeftMenu" :class="item.url == $route.path ? 'active' : ''"
        :key="index" @click="$router.push(item.url)">
        <div class="icon iconfont" :class="[item.ico, { active: item.url == $route.path }]"></div>
        <div>{{ item.name.substr(0, 2) }}</div>
      </div>
    </div>
  </el-aside>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'AsideView',
  computed: {
    ...mapGetters(['getLeftMenu']),
  },
}
</script>

<style lang="less" scoped>
@import url(../assets/iconfont/iconfont.css);
@import url(../assets/css/aside.less);
</style>